home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Net / Utilities / Seer family 2.0 / sr_prg.src / sp_main.c < prev   
Encoding:
C/C++ Source or Header  |  1987-08-29  |  1.4 KB  |  56 lines  |  [TEXT/KAHL]

  1. /*
  2.     sp_main.c - main program
  3. */
  4.  
  5. #include "sp.h"
  6. #include "sc_seer_globals.h"
  7. #include <deskmgr.h>
  8.  
  9. /*this isn't really a routine, the address of the seer data is stored
  10.    (patched into) here when seer starts up
  11.    
  12.    Furthermore, in the program (not the da) this doesn't do anything
  13.    usefull since a4 isn't the global register.
  14. */
  15. void real_sr_a4()
  16. {asm {
  17.     dc.l 0            /*0 means that the storage isn't setup yet*/
  18.     }
  19. };
  20.  
  21. void load_global_rtn()
  22. {
  23. }
  24.  
  25. void main(void);
  26. void main()
  27. {init_globals();        /*globals with values common to prog and DA */
  28.  gl.res_base=128;        /*our resources of each type start here*/
  29.  gl.win_ref_num=8;        /*set the kind field of program windows*/
  30.  
  31.  if(setjmp(gl.seer_exit_lngjmp)!=0)    /*set a place to throw errors*/
  32.   ExitToShell();        /*quit the program*/
  33.  
  34.  init_mac();            /*do one time mac initilization*/
  35.  init_windef();
  36.  open_seer();            /*open the seer device*/
  37.  load_seer();            /*match version*/
  38.  configure_seer();        /*setup seers queues*/
  39.  
  40.  pdl_opn_res();            /*read in the pdl definition*/
  41.  
  42.  st_new_windef();        /*make the status display window*/
  43.  sk_new_windef();        /*make a new scope window*/
  44.  pk_new_windef();        /*make the seer display window*/
  45.  
  46.  CloseDriver(-41);
  47.  CloseDriver(-40);
  48.  CloseDriver(-10);
  49.  CloseDriver(-9);        /*close the driver*/
  50.  seer_on();                /*start data collection*/
  51.  
  52.  event_loop();            /*run the program till it wants to quit*/
  53.  
  54.  close_seer();            /*close the seer device, bomb if we can't*/
  55. }
  56.